<?php
/**
* Provides a number of methods for associating a schedule with your own custom
* models.
*
* Copyright (c) 2009 James Gauld <james@jamesgauld.net>
* This file is part of Scribble.
* @license http://www.scribblecms.co.uk/license.txt
*
* @package Scribble
*/
class ScheduleManager extends ScribbleModelManager {

	/**
	* Finds any Schedule models whose schedule falls between the given dates (or
	* ON the date if only one date is provided.)
	*
	* You can then find all of your custom models that are related to theses
	* Schedule models.
	*
	* @param int Unix timestamp
	* @param int Unix timestamp
	* @return Buan\ModelCollection
	*/
	public static function findSchedules($dateA, $dateB=NULL) {
	}

	/**
	* Upon saving, the expression is evaluated to determine the range of dates
	* that it will cover so that we can complete the "datefirst" and "datelast"
	* columns.
	*
	* @param ScribbleModel Model to save
	* @return bool
	*/
	public function save($model) {
		// TODO: Set datefirst/last columns based on expression
		return parent::save($model);
	}
}
?>